﻿using Photo.Core.Dtos.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Photo.Application.System.User.Dto
{
    /// <summary>
    /// 用户保存input
    /// </summary>
    public class UserSaveInput : PrimaryKey
    {
        /// <summary>
        /// 账号
        /// </summary>
        [Required]
        [MinLength(5, ErrorMessage = "账号长度不能少于5位")]
        [MaxLength(20, ErrorMessage = "账号长度不能超过20位")]
        public string Account { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [RegularExpression(@"^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{7,30}$", ErrorMessage = "必须须包含大小写字母和数字的组合，不能使用特殊字符，长度在7-30之间")]
        public string Password { get; set; }
        /// <summary>
        /// 是否有效
        /// </summary>
        public bool IsActive { get; set; }
        /// <summary>
        /// 角色ids
        /// </summary>
        public string RoleIds { get; set; }
    }
}
